package panda.android.notebook.view;

import panda.android.notebook.Utils.AppConfig;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class Cursor {
	private int startX, startY, stopX, stopY;
	private Paint linePaint;

	public Cursor() {
		// 光标的paint
		linePaint = new Paint();
		linePaint.setColor(Color.BLACK);
		linePaint.setAntiAlias(true);
		linePaint.setStrokeWidth(4);
	}

	public void setPoint(int x, int y) {
		startX = x;
		startY = y;
		stopX = x + 2;
		stopY = y +AppConfig.ROWHEIGHT;
	}

	public void draw(Canvas canvas) {
		// TODO Auto-generated method stub
		// 绘制光标
		canvas.drawLine(startX, startY, stopX, stopY, linePaint);

	}
}
